<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
	<title>要闻-修改要闻</title>
	<link rel="icon" href="favicon.ico" type="image/ico">
	<meta name="keywords" content="审核">
	<meta name="author" content="yinqi">
	<link href="/css/bootstrap.min.css" rel="stylesheet">
	<link href="/css/materialdesignicons.min.css" rel="stylesheet">
	<link href="/css/style.min.css" rel="stylesheet">

</head>
<body>
<div class="row">
	<div class="col-lg-12">
		<div class="card">
			<div class="card-header"><h4>要闻-要闻管理-编辑要闻</h4></div>
			<div class="card-body">

				<form action="/news/updateNews" method="post" class="row" >
					<div class="form-group col-md-12"></div>
					<div class="form-group col-md-12">
						<label for="newsTittle">要闻标题</label>
						<input type="text" class="form-control" id="newsTittle" name="newsTittle" th:value="${news.newsTittle}" required/>
						<input type="hidden" name="newsId" th:value="${news.newsId}">
						<input type="hidden" name="newsUser" th:value="${news.newsUser}">
					</div>

					<div class="form-group col-md-12"></div>
					<div class="form-group col-md-12">
						<label for="newsContent">要闻内容</label>
						<!---->
						<div id="div1" th:utext="${news.newsContent}">

						</div>
						<input type="hidden" class="form-control" id="newsContent" name="newsContent" required>
					</div>

					<div class="form-group col-md-12">
						<button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
						<button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</form>

			</div>
		</div>
	</div>

</div>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/axios.min.js"></script>
<script type="text/javascript" src="/js/wangEditor.min.js"></script>
<script type="text/javascript">
    var E = window.wangEditor;
    var editor = new E('#div1');
    var $text1 = $('#newsContent');
    editor.customConfig.onchange = function (html) {
        // 监控变化，同步更新到 textarea
        $text1.val(html)
    };
    editor.create();
    // 初始化 textarea 的值
    $text1.val(editor.txt.html())

</script>
</body>
</html>
